package com.hu.chat.model.base;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;

@Data
@TableName(value = "message")
public class Message {
    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 1：好友，2：群聊
     */
    @TableField(value = "`type`")
    private Integer type;

    /**
     * 消息
     */
    @TableField(value = "message")
    private String message;

    /**
     * 发送者id
     */
    @TableField(value = "send_id")
    private Integer sendId;

    /**
     * 发送时间
     */
    @TableField(value = "send_time")
    private Date sendTime;

    /**
     * 接受者id
     */
    @TableField(value = "recive_id")
    private Integer reciveId;

    /**
     * 接受时间
     */
    @TableField(value = "recive_time")
    private Date reciveTime;

    /**
     * 群id
     */
    @TableField(value = "group_id")
    private Integer groupId;
}